package socket;

public final class Sockets {
	
	public static final String DEFAULT_HOST = "localhost";
	
	public static final int DEFAULT_PORT = 4444;
	
	public static final String[] CIPHERS = { "SSL_DH_anon_WITH_RC4_128_MD5" };
	
	private Sockets(){}
	

	public static Server newServer(){
		
		return newServer(DEFAULT_PORT);
	}
	
	public static Server newServer(int port){
		
		return new Server(port, new SimpleBuilder());
	}
	
	public static Server newSSLServer(){
		
		return newSSLServer(DEFAULT_PORT);
	}
	
	public static Server newSSLServer(int port){
		
		return new Server(port, new SSLBuilder(CIPHERS));
	}
	
	public static Client newClient(int port){
		
		return newClient(DEFAULT_HOST, port);
	}
	
	public static Client newClient(String host, int port){
		
		return new Client(host,port,new SimpleBuilder());
	}
	
	public static Client newSSLClient(){
		
		return newSSLClient(DEFAULT_HOST, DEFAULT_PORT);
	}
	
	public static Client newSSLClient(int port){
		
		return newSSLClient(DEFAULT_HOST, port);
	}
	
	public static Client newSSLClient(String host, int port){
		
		return new Client(host, port, new SSLBuilder(CIPHERS));
	}

}
